Skip to content

fix: bug in PXE::getNotes#15642

Merged
benesjan merged 3 commits intonextfrom
07-10-fix_bug_in_pxe_getnotes
Jul 10, 2025
Merged

fix: bug in PXE::getNotes#15642
benesjan merged 3 commits intonextfrom
07-10-fix_bug_in_pxe_getnotes

Conversation

@benesjan
Copy link
Copy Markdown
Contributor

@benesjan benesjan commented Jul 10, 2025

PXE::getNotes didn't trigger private state sync.This had an impact on the NotesFilter as now the contract address is mandatory as it's needed for the note sync. PXE::getPrivateEvents behaves the same way.

Copy link
Copy Markdown
Contributor Author

benesjan commented Jul 10, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@benesjan benesjan force-pushed the 07-10-fix_bug_in_pxe_getnotes branch from 5bc4868 to 44d5753 Compare July 10, 2025 04:53
@benesjan benesjan marked this pull request as ready for review July 10, 2025 04:53
const deployed = deployNullifiers[nullifier.toString()];
const note = deployed
? (await pxe.getNotes({ siloedNullifier: nullifier, contractAddress: deployed }))[0]
: undefined;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deployed is sometimes randomly undefined so had to do this here

@benesjan benesjan requested a review from Thunkar July 10, 2025 06:18
@Thunkar
Copy link
Copy Markdown
Contributor

Thunkar commented Jul 10, 2025

Maybe this API shouldn't even exist in the first place, WDYT?

@benesjan
Copy link
Copy Markdown
Contributor Author

benesjan commented Jul 10, 2025

Maybe this API shouldn't even exist in the first place, WDYT?

@Thunkar I was thinking about this and generally I agree as this forces the dev to re-interpret note's content out of Noir which is bug prone. But I think there are some edge cases where a utility function returning you the notes is too cumbersome and that is when you expect to be working with a lot of notes. In that case Noir's lack of dynamic arrays would force you to paginate and that seems quite annoying. I am just working on the Closed Set Orderbook and there I can imagine this happening in prod because you would have some kind of off-chain solver that would be matching the orders. There you would probably be working with thousands of notes. This might be kind of a pie-in-the-sky usecase at this point but anyway would just keep it around for this reason.

(Also is useful for debugging)

But I have this feeling that @nventuro might disagree with me here 😆

@benesjan benesjan requested a review from Thunkar July 10, 2025 08:57
@benesjan benesjan enabled auto-merge July 10, 2025 08:57
Copy link
Copy Markdown
Contributor

@Thunkar Thunkar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll approve what's currently here, but I think @nventuro will have some thoughts 🤣

@benesjan benesjan added this pull request to the merge queue Jul 10, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 10, 2025
@benesjan benesjan added this pull request to the merge queue Jul 10, 2025
Merged via the queue into next with commit 89c4723 Jul 10, 2025
5 checks passed
@benesjan benesjan deleted the 07-10-fix_bug_in_pxe_getnotes branch July 10, 2025 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants